#ifndef __ABSTRACTION__
#define __ABSTRACTION__

#include <iostream>
#include "Implementor.h"

using namespace std;

class Abstraction
{
	public:
		Abstraction() {};
		virtual ~Abstraction() {};
		
		virtual void Operation() = 0;

		void setImplementor(Implementor* imp)
		{
			pImp = imp;
			return;
		}

	protected:
		Implementor* pImp;
};

class Refined1: public Abstraction
{
	public:
		Refined1() {};
		virtual ~Refined1() {};

		virtual void Operation()
		{
			cout << "Refined1 call Operation\n";
			pImp->OperationImp();
			cout << "Refined1 call end\n";
			return;
		}
		
		
};

class Refined2: public Abstraction
{
	public:
		Refined2() {};
		virtual ~Refined2() {};

		virtual void Operation()
		{
			cout << "Refined2 call Operation\n";
			pImp->OperationImp();
			cout << "Refined2 call end\n";
			return;
		}
};



#endif
